package org.gesplan.util;

import org.jdesktop.beansbinding.Validator;

/**
 * Validator that ensures that given value is > 0.
 * 
 * @author David Erill
 */
public class FloatValidator extends Validator<Float> {

    @Override
    public Result validate(Float value) {
        if (value == -999){
            return new Result(null, Utils.getBundle().getString("VALIDATE_NUMBER"));
        }
        if (value < 0) {
            return new Result(null, Utils.getBundle().getString("VALIDATE_NUMBER2"));
        }
        return null;    
    }
}